package com.sikaryofficial.backend.constant;

import lombok.Getter;

/**
 * @author : wuweihong
 * @desc : 搜索业务类型
 * @date : 2025-08-20
 */

@Getter
public enum SearchBusinessEnum {
    ARTICLE("article", "文章"),
    STORE("store", "店铺"),
    ;
    private final String code;
    private final String desc;

    SearchBusinessEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static SearchBusinessEnum getByCode(String code) {
        for (SearchBusinessEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
